package com.leimo.controller;

import com.leimo.dto.ChatInfoDto;
import com.leimo.service.CustomerServiceService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 客服
 *
 * @author 段誉
 * @create 2019-02-26 15:54
 */
@Controller
@RequestMapping("/customer_service")
public class CustomerServiceController {

  @Autowired
  private CustomerServiceService customerServiceService;

  @GetMapping
  public String index() {
    return "/im/customer_service";
  }

  @GetMapping("/get_info")
  @ResponseBody
  public ChatInfoDto getInfo() {
    return customerServiceService.getInfo();
  }
}
